import React from "react";
import s from './style.module.less'
import { Link } from 'react-router-dom'
export function TabbarItem(props) {
    let { icon, title, itemKey,lightHight,activeKey,activeicon} = props

    return (
        <div className={s.tableItem} onClick={()=>{lightHight(itemKey)}} >
            <Link to={itemKey} style={{ textDecoration: "none" }}>
                <div className={s.itemIcon}>
                    <svg className="icon" aria-hidden="true">
                        <use xlinkHref={activeKey==itemKey? activeicon:icon}></use>
                    </svg>
                </div>
                <div className={`${s.itemText}` } style={activeKey==itemKey?{color:'#1296db'}:{}}>
                    {title}
                </div>
            </Link>
        </div>
    )
}